package cn.imu.appdevexperiment2020._2activity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import androidx.annotation.Nullable;

import java.util.List;

import butterknife.BindView;
import cn.imu.appdevexperiment2020.R;
import cn.imu.appdevexperiment2020.common.BaseActivity;

/**
 * 描述:
 *
 * @author chenconghua
 * @version 1.0
 * @create 2022-11-05 17:34
 */
public class ListViewActivity extends BaseActivity {

    private String[] data={"a","b","c","d","e","f","g","h","i"};

    @BindView(R.id.list_view)
    ListView listView;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_listview);

        ArrayAdapter<String> adapter=new ArrayAdapter<String>(
                ListViewActivity.this, android.R.layout.simple_list_item_1,data);
        listView.setAdapter(adapter);
    }
}
